package com.wj.algorithm;


public class ArrayUtil {

    public static String toString(int[] a) {
        StringBuilder b = new StringBuilder();
        for(int i = 0, len = a.length; i < len; i ++) {
            b.append(a[i]).append(",");
        }
        if(b.length() > 1) {
            b.deleteCharAt(b.length() - 1);
        }
        return b.toString();
    }

    public static String toString(long[] a) {
        StringBuilder b = new StringBuilder();
        for(int i = 0, len = a.length; i < len; i ++) {
            b.append(a[i]).append(",");
        }
        if(b.length() > 1) {
            b.deleteCharAt(b.length() - 1);
        }
        return b.toString();
    }
    
}
